/**
 * laydate 开始时间和结束时间的初始化
 * @param startSelector 开始时间的选择器
 * @param endSelector 结束时间的选择器
 */
function initStartAndEnd(startSelector, endSelector) {

    var start = {
        elem: "#search_startTime",
        //elem: startSelector,
        format: "YYYY/MM/DD",
        festival: true, //显示节日
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    }

    var end = {
        elem: "#search_exceptTime",
        //elem :endSelector,
        format: 'YYYY/MM/DD',
        //min: laydate.now(),
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    }

    laydate(start);
    laydate(end);
}


function dateFormatter(value) {
    var val = new Date(value);
    var year = val.getFullYear();
    var month = val.getMonth() + 1;
    var days = val.getDate();
    var hours = val.getHours();
    var minutes = val.getMinutes();

    // return year + "/" + month + "/" + days + " " + hours + ":" + minutes;
    return year + "/" + month + "/" + days;
}
